package com.moonshineproject.plugin.settings.vo
{
	import com.moonshineproject.plugin.settings.renderers.StringRenderer;
	
	import mx.core.IVisualElement;
	
	public class StringSetting extends AbstractSetting
	{
		private var restrict:String;
		
		public function StringSetting(provider:Object, name:String, label:String, restrict:String=null)
		{
			super();
			this.provider = provider;
			this.name = name;
			this.label = label;
			this.restrict = restrict;
			defaultValue = "";
		}
		
		override public function get renderer():IVisualElement
		{
			var rdr:StringRenderer = new StringRenderer();
			if (restrict) rdr.text.restrict = restrict;
			rdr.setting = this;
			return rdr;
		}
		
	}
}